Foxit PDF RDK
FoxitRDKNative.SaveDocTask Class Reference

Represents a task for saving a PDF document to a specified file path. More...

Inheritance diagram for FoxitRDKNative.SaveDocTask:
FoxitRDKNative.Task

Public Member Functions

 constructor (doc, filePath, writer, flag, save_type, cb)
 Constructor for the SaveDocTask class. More...
 
 getPdfDoc ()
 Retrieves the PDF document to be saved. More...
 
- Public Member Functions inherited from FoxitRDKNative.Task
 canCancel ()
 Checks if the task can be cancelled. More...
 
 cancel ()
 Cancels the task. Attempts to cancel the task if it is in a cancellable state.
 
 constructor ()
 Constructor for the Task class. Initializes a new instance of the Task.
 
 errorCode ()
 Gets the error code of the task. More...
 
 exeSuccess ()
 Checks if the task was executed successfully. More...
 
 extErrorCode ()
 Gets the extended error code of the task. More...
 
 finish ()
 Marks the task as finished. Completes the task and performs any necessary cleanup.
 
 getPriority ()
 Gets the current priority of the task. More...
 
 getStatus ()
 Gets the current status of the task. More...
 
 isCanceled ()
 Checks if the task has been cancelled. More...
 
 isModify ()
 Checks if the task has been modified. More...
 
 notify (result)
 Notifies about the result of the js funcion. More...
 
 prepare ()
 Prepares the task for execution. Performs any necessary setup before the task can be run.
 
 setErrorCode (error)
 Sets the error code for the task. More...
 
 setPriority (priority)
 Sets the priority of the task. More...
 
 setStatus (status)
 Sets the status of the task. More...
 

Detailed Description

Represents a task for saving a PDF document to a specified file path.

Member Function Documentation

◆ constructor()

FoxitRDKNative.SaveDocTask.constructor ( doc  ,
filePath  ,
writer  ,
flag  ,
save_type  ,
cb   
)

Constructor for the SaveDocTask class.

Parameters
{PDFDoc}doc - The PDF document to be saved.
{string}filePath - The file path where the document should be saved.
{FileWriterCallback}writer - The callback function for writing the file data, or null if not applicable.
{number}flag - Flags to specify options for the save operation.
{number}save_type - The type of save operation (e.g., save as PDF, save as image).
{SaveDocTaskCallBack}cb - The callback to be invoked with the result of the save document task. Initializes a new instance of the SaveDocTask with the specified document, file path, writer, flags, save type, and callback.

◆ getPdfDoc()

FoxitRDKNative.SaveDocTask.getPdfDoc ( )

Retrieves the PDF document to be saved.

Returns
{PDFDoc} The PDF document instance. Returns the PDF document that is being saved by this task.